import 'package:wukongimfluttersdk/entity/channel.dart';
import 'package:wukongimfluttersdk/entity/conversation.dart';

/// 会话UI视图对象
class UIConversation {
  String lastContent = '';
  WKUIConversationMsg msg;
  WKChannel? wkChannel;
  UIConversation(this.msg);

  String getUnreadCount() {
    if (msg.unreadCount > 0 && msg.unreadCount < 100) {
      return '${msg.unreadCount}';
    }else if (msg.unreadCount >= 100) {
      return '99+';
    }
    return '';
  }

}
